package com.example.volunteeroa.repository;

import com.example.volunteeroa.entity.OrganizationAllocation;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;

@Repository
public interface OrganizationAllocationRepository extends JpaRepository<OrganizationAllocation,Integer> {
    @Transactional
    @Modifying
    @Query(value="delete from OrganizationAllocation where OAID=?1",nativeQuery = true)
    void deleteOrgAlloc(Integer OAID);

}
